package feizhou.untils.tools;

import java.util.Arrays;
import java.util.List;

/**
 * @version :
 * @ClassName : ArrayUtil.java
 * @Description:
 * @Modification history Jan 5, 2015 4:09:38 PM
 * @Autor : driver.deng  driver_deng@163.com
 * @Date : Jan 5, 2015 4:09:38 PM
 */
public class ArrayUtil {

    /**
     * 数线是否包含这个元素
     */
    public static boolean isContains(Object[] objs, Object obj) {
        boolean isContains = false;
        if (objs == null || objs.length == 0) {
            return isContains;
        }
        for (Object o : objs) {
            if (obj == null && o == null) {
                return true;
            }
            if (obj != null && o != null && obj.equals(o)) {
                return true;
            }
        }
        return isContains;
    }

    /**
     * 数组转list
     * @return List
     * @author <a href="920786312@qq.com">周飞</a>
     * @since 2023/11/30 15:05
     */
    public static <T> List<T> toList(T... a) {
        return Arrays.asList(a);
    }


    public static void main(String[] args) {

    }
}
